﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using Core;
/// <summary>
/// Summary description for WebService
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
 [System.Web.Script.Services.ScriptService]
public class WebService : System.Web.Services.WebService {

    public WebService () {

        //Uncomment the following line if using designed components 
        //InitializeComponent(); 
    }

    [WebMethod]
    public string HelloWorld() {
        return "Hello World";
    }
    [WebMethod]
    public bool Delete_CanBoChucVu(int maCanBo, int maChucVu)
    {
        return CanBoChucVu.Delete(maCanBo, maChucVu) > 0;
    }

    [WebMethod]
    public bool Delete_CanBoKhenThuong(int maCanBo, int maKhenThuong)
    {
        return CanBoKhenThuong.Delete(maCanBo, maKhenThuong) > 0;
    }
    [WebMethod]
    public bool Delete_CanBoKyLuat(int maCanBo, int maKyLuat)
    {
        return CanBoKyLuat.Delete(maCanBo, maKyLuat) > 0;
    }

    [WebMethod(EnableSession=true)]
    public bool Logout()
    {
        Session.Abandon();
        return true;
    }
}
